﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;
using Yunzuan.Foundation.Web.Pages;

namespace Yunzuan.Foundation.Web.Pages
{
    public class BaseNeedLoginManagePage : BaseManagePage
    {
        public virtual string LoginPageUrl
        {
            get
            {
                return "/login.aspx";
            }
        }

        protected override void OnPreInit(EventArgs e)
        {
            base.OnPreInit(e);
            //TODO: 登录判断
            if (!this.IsLogin())
            {
                //TODO: 跳转到后台登录页面
                HttpContext.Current.Response.Redirect(this.LoginPageUrl);

                //扩展：如果是SSO站点，则跳转到认证中心(Passport)
            }
        }
    }
}
